9ce369cf780655a78921e5a4f07296be1977f8e5,src/main/java/com/cloudbees/jenkins/plugins/sshagent/SSHAgentBuildWrapper.java,DescriptorImpl,doFillIdItems,#,489

Before Change


            @SuppressWarnings("unused") // used by stapler
            public ListBoxModel doFillIdItems() {
                Item item = Stapler.getCurrentRequest().findAncestorObject(Item.class);
                return new StandardUsernameListBoxModel().withMatching(SSHAuthenticator.matcher(),
                        CredentialsProvider.lookupCredentials(SSHUserPrivateKey.class, item, ACL.SYSTEM,
                                Collections.<DomainRequirement>emptyList())
                );
            }

        }

After Change


             */
            @SuppressWarnings("unused") // used by stapler
            public ListBoxModel doFillIdItems() {
                Item item = Stapler.getCurrentRequest().findAncestorObject(Item.class);
                return new StandardUsernameListBoxModel()
                        .includeMatchingAs(
                                item instanceof Queue.Task ? Tasks.getAuthenticationOf((Queue.Task) item) : ACL.SYSTEM,
                                item,
                                SSHUserPrivateKey.class,
                                Collections.<DomainRequirement>emptyList(),
                                SSHAuthenticator.matcher()
                        );
            }

        }